package io.gitee.hchaojie.day04;

public interface Inserter {
    static final int NAME = 1;

    void insert();
    
    void getName();
}

interface Deleter {
    void delete();
}

interface Updater {
    void udpate();
}

interface Searcher {
    void search();
}

// DAO data access object
// 接口可以继承另外的接口，
// 接口可以继承多个接口
interface Dao extends Inserter, Updater, Deleter, Searcher {

}


// 接口是用来被实现的(implements)
// extends
class InsertHelper implements Inserter {

    @Override
    public void insert() {
        System.out.println("插入数据。。。");
    }

    @Override
    public void getName() {
        System.out.println("getName...");
    }
}

class InsertUpdateHelper implements Inserter, Updater {
    @Override
    public void insert() {

    }

    @Override
    public void getName() {

    }

    @Override
    public void udpate() {

    }
}

// implements
class DaoImpl implements Dao {

    @Override
    public void insert() {

    }

    @Override
    public void getName() {

    }

    @Override
    public void delete() {

    }

    @Override
    public void udpate() {

    }

    @Override
    public void search() {

    }
}